This application is based upon and claims the benefit of priority from the prior Japanese Patent Application No. 11-333371, filed Nov. 24, 1999, the entire contents of which are incorporated herein by reference.
The present invention relates to a tone signal receiving apparatus for detecting a tone signal, a tone signal transmitting apparatus for generating a tone signal, and a tone signal transmitting/receiving apparatus having a function of receiving a tone signal and transmitting a tone signal, which are used in the field of communications and, more particularly, to a tone signal receiving apparatus, tone signal transmitting apparatus, and tone signal transmitting/receiving apparatus, which implement the above tone signal receiving apparatus, tone signal transmitting apparatus, and tone signal transmitting/receiving apparatus by digital circuits, respectively.
Conventionally, in a key telephone system used in an office building or business office, a key telephone main apparatus (to be referred to as a main apparatus hereinafter) having a switching function has the arrangement shown in FIG. 1. Reference numeral 1A denotes a main apparatus.
Referring to FIG. 1, the main apparatus 1A comprises a trunk unit 11, line card 12, time switch section (to be referred to as a TSW hereinafter) 13, control section 14, and DTMF (Dual Tone Multi Frequency) signal receiving section 15. These components are connected to each other through a voice bus (to be referred to as a PCMHW hereinafter) 16 and control bus (to be referred to as a DHW hereinafter) 17.
The trunk unit 11 is connected to an external communication network NW through a subscriber""s line ISL and has an interface function to the external communication network NW. The line card 12 is connected to extension terminals T1 to Tm through a plurality of extension lines EL1 to ELm and has an interface function to these extension terminals T1 to Tm. Examples of the extension terminals T1 to Tm are standard telephone sets and key telephone sets.
The TSW 13 selectively connects the trunk unit 11 to the line card 12 in accordance with an instruction from the control section 14. The TSW 13 also selectively connects one of the trunk unit 11 and line card 12 to the DTMF signal receiving section 15.
The DTMF signal receiving section 15 has a codec 15a and PB receiver 15b. The codec 15a converts an input digital signal into an analog signal and outputs the analog signal to the PB receiver 15b. The PB receiver 15b detects and identifies a DTMF signal from the input analog signal.
The operation of detecting a DTMF signal in the main apparatus 1A will be described below.
When the user presses a dial key on the extension terminal T1, a DTMF signal according to the dial key is generated from the extension terminal T1 This DTMF signal contains high- and low-frequency orthogonal components, as shown in FIG. 2. The DTMF signal is transferred to the TSW 13 through the line card 12 and PCMHW 16 and then transferred to the DTMF signal receiving section 15 through the TSW 13 and PCMHW 16.
In the DTMF signal receiving section 15, a number of codecs 15a must be prepared in units of channels because each codec 15a extracts a signal on a predetermined channel of a number of channels multiplexed on the PCMHW 16. The necessary number of codecs 15a is eight for 100 accommodated lines. Hence, the DTMF signal receiving section 15 has a large circuit scale, and integration for cost reduction is difficult.
In recent years, processing by the DTMF signal receiving section 15 may be implemented using a DSP (Digital Signal Processor).
FIG. 3 shows the internal block of a DTMF signal receiving section using a DSP.
This DTMF signal receiving section comprises a control bus interface section (to be referred to as a DHW I/F hereinafter) 21, CPU 22, and DSP 23. The DHW I/F 21 has an interface function to the DHW 17. The CPU 22 controls processing of the DSP 23 on the basis of a control signal supplied from the DHW 17 through the DHW I/F 21. The DSP 23 has a storage section 231 which stores a Goertzel algorithm to be described below. More specifically, the DSP 23 detects and identifies a DTMF signal from a PCM signal supplied from the PCMHW 16 in accordance with the program stored in the storage section 231 upon receiving an instruction from the CPU 22.
The Goertzel algorithm will be described below.
This Goertzel algorithm is optimum to DTMF signal detection by the discrete Fourier transform, in which a signal on the time axis is converted into a signal on the frequency axis and output, as in the Fourier transform. Generally, in the Fourier transform, when input signals at N sampling points on the time axis are calculated, output signals at N points are obtained on the frequency axis. In the Fourier transform, however, when only eight frequencies suffice as output points for such DTMF signal detection, the arithmetic operation is wasteful.
To prevent this, in the Goertzel algorithm, the number of samples is selected such that a spectrum only at a specific frequency is output, and the square of an output value is calculated to eliminate the complex number generated by the arithmetic operation so that only a real number can be output to make the processing easy. Note that the DTMF signal is a mixed wave of one frequency selected from four low-frequency components and one frequency selected from four high-frequency components, as shown in FIG. 2, and is represented by a mixed wave in a total of 16 combinations. Hence, when the DTMF signal is Fourier-transformed into a signal on the frequency axis, each of the two, high- and low-frequency components contained in the DTMF signal is represented by a peak value at one point. The DSP 23 can recognize and detect the type of DTMF signal from the combination of two frequencies corresponding to the peaks.
However, for the above-described method using the DSP 23, a program for executing the Goertzel algorithm must be created. In addition, causing the CPU 22 and DSP 23 to execute the Goertzel algorithm requires to prepare a number of ROMs or RAMs or a large-capacity memory in the DSP 23 and also requires to change the CPU 22 to a processor compatible to high-speed operation. These pose a serous problem in integration and cost reduction of the DTMF signal receiving section and also increase the power consumption.
FIG. 4 shows the arrangement of another conventional key telephone system. In this key telephone system, a main apparatus 1B has a tone signal generator 18. The same reference numerals as in FIG. 1 denote the same parts in FIG. 4, and a detailed description thereof will be omitted.
The tone signal generator 18 is connected to a TSW 13 and control section 14 and time-divisionally generates a tone signal formed from a plurality of kinds of waveforms in accordance with an instruction from the control section 14. The tone signal is selectively sent to extension terminals T1 to Tm by the TSW 13.
To time-divisionally generate a tone signal, the tone signal generator 18 stores data in a ROM 181, as shown in FIG. 5, and extracts data therefrom.
The ROM 181 has continuous areas for storing data of waveforms #1 to #nxe2x88x921. The areas have the same size of m bytes. Each area stores the amplitude value data of the waveform to be generated. One waveform is generated by reading the m-byte data in accordance with the order from #1 to #nxe2x88x921.
The tone signal generator 18 also has a counter 182 for waveform number switching and a counter 183 for data number switching. More specifically, in the tone signal generator 18, data represented by an address value obtained by adding, by an adder 184, an upper bit output from the counter 182 and a lower bit output from the counter 183 is extracted from the ROM 181 and output.
The operation in the tone signal generator 18 will be described. The counter 182 counts from 0. When the count value reaches nxe2x88x921, it returns to 0, and simultaneously, the value of the counter 183 is incremented by one. The counter 183 also counts from 0, and when the count value reaches mxe2x88x921, it returns to 0. The adder 184 adds the output value from the counter 182 as an upper bit and the output value from the counter 183 as a lower bit to generate an address value and gives it to the ROM 181. When such operation is continued, the waveform data are output from the ROM 181 one by one whereby n waveforms are time-divisionally output.
However, since the waveform data are stored in the ROM 181, the circuitry of the tone signal generator 18 becomes bulky, resulting in difficulty in integration. In addition, since predetermined waveform data are stored in the ROM 181, the tone signal generator 18 cannot flexibly cope with a change in frequency and amplitude of a waveform, a change in data compression scheme, and switching between 2-frequency addition and 2-frequency alternating in an output waveform. To solve these problems, the tone signal generator 18 must be inevitably modified in design of the ROM 181, resulting in an increase in cost.
It is an object of the present invention to provide a tone signal receiving apparatus, tone signal transmitting apparatus, and tone signal transmitting/receiving apparatus which can realize downsizing and reduction in cost and power consumption by integration using a simple digital circuit.
More specifically, it is the first object of the present invention to provide a tone signal receiving apparatus capable of suppressing an increase in circuit scale, reducing the cost, and forming a one-chip structure in realizing tone signal discrimination processing by a digital circuit.
It is the second object of the present invention to provide a tone signal transmitting apparatus capable of reducing the memory capacity and also flexibly coping with a change in frequency and amplitude of a waveform, a change in data compression scheme, and switching between 2-frequency addition and 2-frequency alternating in an output waveform.
It is the third object of the present invention to provide a tone signal transmitting/receiving apparatus capable of realizing tone signal transmission and reception processing by a single apparatus while minimizing an increase in circuit scale.
The tone signal receiving apparatus according to the present invention is directed to a tone signal receiving apparatus for executing reception processing of a tone signal generated by arbitrarily combining a plurality of reference frequencies.
In order to achieve the above objects, the apparatus comprises arithmetic processing means for adding a predetermined first reference value for each of the plurality of reference frequencies and a predetermined second reference value for each of the plurality of reference frequencies to calculate an arithmetic value at current time for each of the plurality of reference frequencies, the first reference value being calculated by multiplying the arithmetic value for each of the reference frequencies by a coefficient, which is held in said processing means, before a predetermined period which is n times of sampling periods, wherein n is an arbitrary natural number, the coefficient being determined in accordance with each of the reference frequencies, the second reference value being calculated by subtracting the arithmetic value for each of the reference frequencies from a current tone signal, which is held in said processing means, before 2 times of the predetermined periods, and the arithmetic value being obtained by repeating processing of adding the first reference value and the second reference value a number of times equal to a number of samples corresponding to each of the plurality of reference frequencies.
The apparatus also comprises output value extraction means for extracting an output value equal to or larger than a predetermined threshold value from the product-sum arithmetic values for the respective reference frequencies, which are calculated by the arithmetic processing means, and signal determination means for determining a type of the tone signal on the basis of at least two output values extracted by the output value extraction means.
The processing means comprises subtracting means for subtracting a signal the 2n sampling periods before from the tone signal, adding means for adding an output from the subtracting means to signal before the determined period to output the arithmetic value, first delaying means for delaying an output from the addition means by the determined period, second delay means for delaying an output from the first delay means by the determined periods and outputting the value to the subtracting means, and multiplication means for multiplying the output from the first delay means by the coefficient corresponding to the reference frequency and outputting the value to the addition means, and also comprises a memory circuit which stores a number of samples and coefficient corresponding to each of the plurality of reference frequencies, and arithmetic control means for sequentially reading out and outputting each number of samples and coefficient from the memory circuit every time arithmetic operation for one reference frequency is ended, and giving the coefficient to the multiplication means to execute arithmetic processing a number of times equal to the number of samples.
According to this arrangement, a product-sum arithmetic device which constructs the Goertzel algorithm by a digital circuit is used to discriminate a tone signal. This product-sum arithmetic device has a feedback loop structure in which the first reference value for each of the plurality of reference frequencies of the tone signal before the determined period and the second reference value for each of the plurality of reference frequencies of the tone signal before 2 times is the determined period are added to calculate product-sum arithmetic values at the current time for each of the reference frequencies a number of times equal to the number of samples for each of the reference frequencies. When appropriate numbers of samples and coefficients corresponding to all reference frequencies possibly contained in the tone signal are ensured, the apparatus can cope with an arbitrary frequency contained in an actual tone signal without requiring any extra dedicated circuit. When at least two output values equal to or larger than the predetermined threshold value are extracted for the product-sum arithmetic values obtained by the product-sum arithmetic device, a frequency contained in the tone signal can be detected, and the type of tone signal can be determined on the basis of the detection result. That is, tone signal detection processing is divisionally executed by the respective digital circuits so that DTMF signal detection processing equivalent to the conventional processing using a codec section and processing using a DSP can be realized.
For this reason, when the product-sum arithmetic device having the Goertzel algorithm constructed by a digital circuit is used, creation of a program for executing the Goertzel algorithm and a large-capacity memory for storing the program are unnecessary. In addition, when the tone signal detection processing is divisionally executed by the respective digital circuits, the process capacity of one digital circuit can be lower. Hence, an increase in circuit scale can be suppressed, allowing integration and cost reduction.
According to the present invention, there is also provided a tone signal transmitting apparatus for time-divisionally generating a tone signal formed from a plurality of types of waveforms, comprising amplitude information generation means, having a memory whose information contents are rewritable by an external control signal, for sequentially outputting a plurality of types of amplitude information written in the memory, frequency information generation means, having a memory whose information contents are rewritable by an external control signal, for sequentially outputting a plurality of types of frequency information written in the memory, sine wave generation means for outputting a sine wave signal as the tone signal on the basis of amplitude information and frequency information output by the amplitude information generation means and the frequency information generation means, and reset means for resetting the sine wave generation means at a predetermined interval to stabilize the sine wave signal output for the sine wave generation means.
According to this arrangement, instead of having a memory storing waveform information, the memory which store the amplitude information and the memory which store the frequency information, are used, when the plurality of types of amplitude information and the plurality of types of frequency information stored in these memories are sequentially read out, a sine wave signal to be sent as a tone signal is generated. For this reason, the memory used in the entire apparatus can be made small. In addition, the waveform to be generated can easily be changed by rewriting the frequency information and amplitude information in the memories on the basis of an external control signal. In generating a waveform, the waveform changes due to a calculation error. However, the sine wave output can be stabilized by resetting the sine wave generation means at a predetermined interval.
In the above arrangement, the reset means resets the sine wave generation means when the sign of the sine wave signal output from the sine wave generation means changes from + to xe2x88x92 after the elapse of a predetermined period.
According to this arrangement, instead of resetting the sine wave generation means immediately after the elapse of the predetermined period, it is reset after the waveform changes from + to xe2x88x92. Hence, the sine wave generation means can be smoothly reset without interrupting the output waveform.
In the above arrangement, the apparatus further comprises rectangular processing means for selectively deriving the sine wave signal output from the sine wave generation means or the amplitude information output from the amplitude information generation means using an output selector for switching in accordance with an external control signal so as to selectively replace an amplitude value of the sine wave signal output from the sine wave generation means with a fixed value.
This arrangement enables control to determine whether the sine wave signal is to be converted into a rectangular wave signal by external control. When a sine wave can be generated using an amplitude value after rectangular processing by selectively replacing the amplitude value of the sine wave signal output from the sine wave generation means the fixed value by the output selector, the amplitude value information storage device for rectangular processing can be omitted.
In the above arrangement, the apparatus further comprises addition/alternating processing means, the addition/alternating processing means comprising an adder for adding the sine wave signal output from the sine wave generation means and an output from the rectangular processing means, an alternating processor for alternately selectively outputting an output from the sine wave generation means and an output from the rectangular processing means at a predetermined period, and an output selector for selectively deriving an output from the adder and an output from the alternating processor on the basis of an external control signal.
According to this arrangement, with the output selector for selectively deriving the output from the adder or the output from the alternating processor on the basis of an external control signal, addition processing and alternating processing can easily be switched in accordance with the tone signal to be generated.
In the above arrangement, the apparatus further comprises compression means, capable of switching between a first compression rule and a second compression rule for different compression schemes on the basis of an external control signal, for selectively compressing an output from the addition/alternating processing means on the basis of the first compression rule or the second compression rule.
According to this arrangement, the compression scheme for the tone signal to be generated can be changed anytime in accordance with an external instruction.
According to the present invention, there is also provided a tone signal transmitting/receiving apparatus for receiving and processing a tone signal formed by arbitrarily combining a plurality of reference frequencies within a predetermined band and generating and transmitting a tone signal having a desired frequency, comprising addition means for adding a predetermined first reference value for each of the plurality of reference frequencies and a predetermined second reference value for each of the plurality of reference frequencies within the band of the tone signal to calculate a product-sum arithmetic value at current time for each of the plurality of reference frequencies, first delay means for delaying an output value from the addition means by n (n is an arbitrary natural number) sampling periods, second delay means for delaying an output value from the first delay means by the n sampling periods, multiplication means for multiplying the output from the first delay means by a coefficient determined in accordance with a reference frequency to calculate the first reference value for each of the reference frequencies, and subtraction means for calculating the second reference value from an output value from the second delay means, wherein in a tone signal transmission processing mode, the output value from the second delay means is set to an initial amplitude value determined in accordance with a frequency of a tone signal to be generated, a coefficient determined in accordance with the frequency of the tone signal to be generated is given to the multiplication means, and the second reference value is generated by the subtraction means by inverting the output value from the second delay means, and in a tone signal reception processing mode, an input signal is input to the subtraction means, the product-sum arithmetic value for each of the reference frequencies the 2n sampling periods before is subtracted from the input signal to calculate the second reference value for each of the reference frequencies, and the coefficient determined in accordance with the reference frequency is given to the multiplication means.
In this arrangement, in the tone signal transmission processing mode, the first reference value obtained by multiplying the product-sum arithmetic value the n sampling periods before by the coefficient determined in accordance with the frequency of the desired tone signal and the second reference value obtained by inverting the product-sum arithmetic value the 2n sampling periods before are added to obtain the tone signal to be transmitted. In the tone signal reception processing mode, product-sum arithmetic processing of adding the first reference value obtained for each of the reference frequencies by multiplying the product-sum arithmetic value for each of the reference frequencies the n sampling periods before by the coefficient determined in accordance with the reference frequency and the second reference value obtained for each of the reference frequencies by subtracting the product-sum arithmetic value for each of the reference frequencies the 2n sampling periods before from the current input signal is repeatedly executed for the respective reference frequencies. That is, the product-sum arithmetic device which constructs the Goertzel algorithm by a digital circuit is shared by tone signal transmission processing and tone signal reception processing. In accordance with the tone signal transmission processing mode or tone signal reception processing mode, the coefficient and parameter values are selectively given to the subtractor, multiplier, and second delay element in the product-sum arithmetic device.
Hence, according to the above arrangement, the product-sum arithmetic device need not be separately prepared for tone signal transmission processing and tone signal reception processing. In addition, in the tone signal transmission processing mode, a tone signal having a desired frequency can be generated only by setting the output value from the second delay element in the product-sum arithmetic device to the initial amplitude value determined in accordance with the frequency of the tone signal to be generated, giving the coefficient determined in accordance with the frequency of the tone signal to be generated to the multiplier, and generating the second reference value by inverting the output value from the second delay element by the subtractor. In the tone signal reception processing mode, a plurality of frequency spectra including each of the reference frequency as the center frequency can be detected from an input signal only by giving the input signal to the subtractor, subtracting the product-sum arithmetic value for each of the reference frequencies the 2n sampling periods before from the input signal to calculate the second reference value for each of the reference frequencies, and giving the coefficient determined in accordance with the reference frequency to the multiplier. The type of tone signal can be determined on the basis of the detection result. For this reason, the circuit scale can be reduced, and downsizing and reduction of cost and power consumption by integration can easily be realized. In addition, it is convenient because the tone signal receiving apparatus or tone signal transmitting apparatus can be selectively used in a single apparatus, as needed.
According to the present invention, the apparatus further comprises a first selector for switching between execution and stop of processing of setting the output value from the second delay means to the initial amplitude value determined in accordance with the frequency of the tone signal to be generated in accordance with the tone signal transmission processing mode, a second selector for switching the coefficient to be given to the multiplication means in accordance with the tone signal transmission processing mode or the tone signal reception processing mode, and a third selector for switching between execution and stop of processing of giving the input signal to the subtraction means in accordance with the tone signal transmission processing mode or the tone signal reception processing mode. The first, second, and third selectors alternately switch at a predetermined period.
With this arrangement, when the first, second, and third selectors are set to alternately switch at a predetermined period, switching control can be automatically executed without manual operation.
According to the present invention, the apparatus further comprises peak extraction means for, in the tone signal reception processing mode, extracting a peak value equal to or larger than a predetermined threshold value from the product-sum arithmetic values calculated by the addition means for the respective reference frequencies, and signal determination means for determining a type of the tone signal on the basis of at least two peak values extracted by the peak extraction means.
According to this arrangement, the type of received tone signal can be determined from two frequencies of the frequency spectra detected from the product-sum arithmetic values obtained by the product-sum arithmetic device, whose peak values are equal to or larger than the threshold value.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.